{% load pp_url %}
{% load topictags %}
{% load logintags %}
{% load reputationtags %}
{% load notificationtags %}


<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}"
    xml:lang="{% firstof LANGUAGE_CODE 'en' %}"
    lang="{% firstof LANGUAGE_CODE 'en' %}">
  <head>

    <link rel="shortcut icon" href="/static/favicon.ico" /> 
    
	<link rel="stylesheet" type="text/css" href="/static/style_fix_1_02.css" />

   <title> {% block title %} {{request.path|cut:"/"|cut:".html"|capfirst}}{% endblock %} - OpenAssembly.org </title>

    {% block css %}
    {% endblock %}

    <script type="text/javascript" src="/static/motionpack.js"></script>

    <script type="text/javascript" src="/static/jquery-1.4.2.min.js"></script>

    <script type="text/javascript">


        function ScrollToElement(theElement){

          var selectedPosX = 0;
          var selectedPosY = 0;
                      
          while(theElement != null){
            selectedPosX += theElement.offsetLeft;
            selectedPosY += theElement.offsetTop;
            theElement = theElement.offsetParent;
          }
                                		      
         window.scrollTo(selectedPosX,selectedPosY);

        }
       
        jQuery(document).ready(function(){
            $('#collapsible_comments').collapsible();
        });

        function changeText(text,div_id)
        {
         elem = document.getElementById(div_id);
         elem.innerHTML = text;
        };

        function changeImgSrc(text,div_id)
        {
         elem = document.getElementById(div_id);
         elem.src = text;
        };

        function js_redirect(location)
        {
            window.location.replace( location );
        };

        function add_tag(tag, obj_id, c_type, app_type){ 
        $.post("/add_tag/", {tag: tag, obj: obj_id, c_type:c_type, app_type:app_type },
          function(data) {
              if(data.FAIL != true){
                  changeText(data.taglist,'ajax_link_tag_list');
                  changeText(data.linktaglist,'ajax_tag_list');

              }
         }, "json");
        };

     
        function upvote(idk,div_id,img_id, img_size){ 
        $.post("/vote/", {vote: "up", pk: idk, img_size:img_size },
          function(data) {
              if(data.FAIL != true){
                  changeImgSrc(data.imgsrc,img_id);
                  changeText(data.count,div_id);
              }
         }, "json");
        };
            function downvote(idk,div_id,img_id, img_size){ 
            $.post("/vote/", {vote: "down", pk: idk, img_size:img_size },
              function(data) {
              if(data.FAIL != true){
                  changeImgSrc(data.imgsrc,img_id);
                  changeText(data.count,div_id);
              }
             }, "json");
            };
        function neutvote(idk,div_id,img_id, img_size){ 
        $.post("/vote/", {vote: "neut", pk: idk, img_size:img_size},
          function(data) {
              if(data.FAIL != true){
                  changeImgSrc(data.imgsrc,img_id);
                  changeText(data.count,div_id);
              }
         }, "json");
        };

    </script>

    {% block js %}

    {% endblock %}

    {% block extra-head %}{% endblock %}


        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-21219475-1']);
            _gaq.push(['_trackPageview']);

            (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>
  </head>

{% if request.scroll_to %}
<body onload="ScrollToElement({{request.scroll_to_div}})">
{% else %}
<body>
{% endif%}
<div class="master">
	<div class="fullheader">
        <div class="header">
		<div class="headtitle">openassembly.org</div>
		<ul>
			<li><a href="{% pp_url template='feed.html' start=0 end=20 %}">feed</a></li>
			<li><a href="{% pp_url template='topics.html' dimension='hot' start=0 end=20 %}">topics</a></li>
			<li><a href="{% pp_url template='issues.html' dimension='hot' start=0 end=20 %}">issues</a></li>
            <li><a href="{% pp_url template='solutions.html' dimension='hot' start=0 end=20 %}">solutions</a></li>
			{# <li><a href="/platform.html">platform</a></li> #}
            {% if request.user.is_authenticated %}
			<li><a href="{% pp_url template='user_profile.html' dimension='i' object=request.user%}">profile</a></li>         
            {% else %} 
            <li><a href="{% pp_url template='register.html' return_path=request.META.PATH_INFO return_query=request.META.QUERY_STRING %}">profile</a></li>
            {% endif %}

			<li><a href="/welcome.html">about</a></li>
		</ul>
    </div>
        

 <div class="mainContent">
        {% block content-header %}

	<div class="threecol">
		<div class="colmid">
			<div class="colleft">
				<div class="col2">
                   {% block browser_bar %}
					<ul>
						<li><a STYLE="text-decoration:none" href="{% pp_url template='issues.html' dimension='hot' start=request.start end=request.end %}">{% ifequal "hot" request.dimension %}<b>hot</b>{% else %}hot{% endifequal %}</a></li> | 
					<li><a STYLE="text-decoration:none" href="{% pp_url template='issues.html' dimension='cont' start=request.start end=request.end %}">{% ifequal "cont" request.dimension %}<b>controversial</b>{% else %}controversial{% endifequal %}</a></li> |
						<li><a STYLE="text-decoration:none" href="{% pp_url template='issues.html' dimension='new' start=request.start end=request.end %}">{% ifequal "new" request.dimension %}<b>new</b>{% else %}new{% endifequal %}</a></li>
					</ul>
                    {% endblock %}
				</div>
				<div class="col3">
                {% block user_register_login %}
                    {% if request.user.username %}
                    {% pp_get_reputation user=request.user %}
					<ul>hello
						<li>{{request.user.username}}</li> | 
                        {% pp_has_mail user=request.user %}
                        {% if pp_messages.has_mail %} 
                          <li><a class="mailbutton" href="{% pp_url template='user_profile.html' dimension='m' object=request.user%}" ></a> </li> |
                        {% else %}
                           <li><a class="nomailbutton" href="{% pp_url template='user_profile.html' dimension='m' object=request.user%}" ></a> </li> |
                        {% endif %}
                        {% endpp_has_mail %}
						<li>rep: {{ pp_reputation.reputation }}</li> | 
						<li><a STYLE="text-decoration:none" href="/logout/">logout</a></li>
                    {% endpp_get_reputation %}
                    {% else %}
					<ul>welcome:
						<li><a STYLE="text-decoration:none" href="{% pp_url template='register.html' return_path=request.META.PATH_INFO return_query=request.META.QUERY_STRING %}">register</a></li> | 
						<li><a href="javascript:;" onmousedown="toggleSlide('login');">login</a></li>
                    {% endif %}
					</ul>
                {% endblock %}

				</div>
			</div>
		</div>
	</div>



          {% if error %}<div class="error">{{ error }}</div>{% endif %}
          {% if info %}<div class="info">{{ info }}</div>{% endif %}
          {% if messages %}
            {% for message in messages %}
              <div class="info">{{ message }}</div>
            {% endfor %}
          {% endif %}
        {% endblock %}
	</div>
</div>



    <div class="container">
        {% autoescape on %}
            {% block content %}
                These aren't the droids you are looking for.
            {% endblock %}
        {% endautoescape %}

      </div>
    </div>
  </div> 
 </div>      
 <div class="footer">
      <p>Copyright (c) {% now "Y" %}, <a href="http://www.pirate-politics.org">pirate-politics</a></p>
 </div>
 </body>
</html>
